//
//  ClassificationCollectionViewCell.m
//  HomeIn
//
//  Created by 张涛 on 15/11/6.
//  Copyright © 2015年 ZZP. All rights reserved.
//

#import "ClassificationCollectionViewCell.h"
#import "ClassificationModel.h"

@implementation ClassificationCollectionViewCell

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self)
    {
        [self create];
        
    }
    return self;
}
-(void)create
{
    self.thumbnailImageView=[[UIImageView alloc]initWithFrame:CGRectMake(0, 10*HEIGHT, 375*WIDTH, 190*HEIGHT)];
    [self addSubview:self.thumbnailImageView];
    //
    self.Label=[[UILabel alloc]initWithFrame:CGRectMake(0, 170*HEIGHT, 375*WIDTH, 30*HEIGHT)];
    [self addSubview:self.Label];
    self.Label.backgroundColor=[UIColor blackColor];
    self.Label.alpha=0.4;
    //
    self.titleLabel=[[UILabel alloc]initWithFrame:CGRectMake(0, 170*HEIGHT, 375*WIDTH, 30*HEIGHT) ];
    self.titleLabel.textColor=[UIColor whiteColor];
    [self addSubview:self.titleLabel];


}
-(void)setModel:(ClassificationModel *)model
{
    
    
    //
    _model=model;
    [self.thumbnailImageView sd_setImageWithURL:[NSURL URLWithString:_model.thumbnail] placeholderImage:nil];
    self.titleLabel.text  = self.model.title;
}
@end
